// /*
//  * @Author: WanYiMing
//  * @Date:2024-05-21-17:57
//  * @Description:
//  */

using Code.Core.CoreBaseClass;
using UnityEditor;
using UnityEngine;

namespace Code.GameLogic.Map.Service
{
    public class BlockService:BaseService
    {
        protected override void OnInit()
        {
            
        }


        public GameObject ToGo(BlockBo blockBo)
        {
            GameObject gameObject = new GameObject(blockBo.GetXY());
            var spriteRenderer = gameObject.AddComponent<SpriteRenderer>();
            spriteRenderer.sprite = Resources.Load<Sprite>("地图/地块/"+blockBo.Type);
            // 可选：为图像设置位置、旋转和缩放
            gameObject.transform.rotation = Quaternion.identity; // 设置旋转
            return gameObject;
        }
    }
}